<extend name="Layout/application"/>

<block name="content">
    <div class="row">
        <div class="col-md-12">

            <div class="row">
                <div class="col-md-8">
                    <div class="page-header">
                        <h1>系统首页</h1>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-md-10">
                    <div class="panel panel-default">
                        <div class="panel-heading">系统信息</div>

                        <div class="panel-body">
                            <form class="form-horizontal" role="form" method="post" action="{{:U('System/do_info')}}">
                                <div class="page1" >
                                    <input type="hidden" name="id" value="{{$mysite.id}}">
                                <div class="form-group">
                                    <label for="owner" class="col-sm-2 control-label" >网站所有者</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="owner" id="owner" placeholder="" value="{{$mysite.owner}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="company_name" class="col-sm-2 control-label">公司名称</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="company_name" id="company_name" placeholder="" value="{{$mysite.company_name}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="site_name" class="col-sm-2 control-label">网站名称</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="site_name" id="site_name" placeholder="" value="{{$mysite.site_name}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="keyword" class="col-sm-2 control-label">关键词</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="keyword" id="keyword" placeholder="" value="{{$mysite.keyword}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="icp" class="col-sm-2 control-label" >ICP备案号</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="icp" id="icp" placeholder=""  value="{{$mysite.icp}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="copyright" class="col-sm-2 control-label">版权信息</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="copyright" id="copyright" placeholder="" value="{{$mysite.copyright}}">
                                    </div>
                                </div>
                                </div>
                                <div class="page2" style="display: none">
                                <div class="form-group">
                                    <label for="email" class="col-sm-2 control-label" >E-mail</label>
                                    <div class="col-sm-10">
                                        <input type="email" class="form-control" name="email" id="email" placeholder="" value="{{$mysite.email}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="qq" class="col-sm-2 control-label">QQ</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="qq" id="qq" placeholder="" value="{{$mysite.qq}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="phone" class="col-sm-2 control-label">联系电话</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="phone" id="phone" placeholder="" value="{{$mysite.phone}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="fax" class="col-sm-2 control-label">传真</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="fax" id="fax" placeholder="" value="{{$mysite.fax}}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="microblog" class="col-sm-2 control-label">新浪微博</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="microblog" id="microblog" placeholder="" value="{{$mysite.microblog}}">
                                    </div>
                                </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-default prev" disabled>上一页</button>
                                        <button type="submit" class="btn btn-default next">下一页</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>


            </div>
        </div>
    </div>
</block>

<block name="js">
    <script>
        $(function () {

                $('.next').click(function () {
                    if ($('.next').text()=='提交'){
                        return true;
                    }else {
                    $('.page1').attr('style','display:none').siblings().attr('style','display:block');
                    $('.prev').prop('disabled',false);
                    $(this).text('提交');
                    return false;
                    }
                })
                $('.prev').click(function () {
                    $('.page2').attr('style','display:none').siblings().attr('style','display:block');
                    $('.prev').prop('disabled',true);
                    $('.next').text('下一页');
                    return false;
                })


        })
    </script>
</block>